<!DOCTYPE html>
<html>
{include file="public/head" /}
<body class="zanpian-body">
<section class="content">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
    <div class="tab-content">
    {notempty name="list"}
     {volist name="list" id="vo"}
     <a class="text-link addtag" href="javascript:;" sid="{$vo.tag_sid}" name="{$vo.tag_name}"><span style=" margin:5px 5px;display:block; float:left">{$vo.tag_name}({$vo.tag_count})</span></a>
     {/volist}
     {else/}
     <div style="width:100%; text-align:center">暂无TAG标签请先添加</div>
     {/notempty}
            </div>
            </div>
         </div>
        </section>
        <div class="box-footer {notempty name=":request()->param('dialog')"}hidden{/notempty} layer-footer">
          <div  class="footer-btn">
               {notempty name=":request()->param('dialog')"}
               <button type="reset" class="btn btn-primary btn-embossed btn-close" onClick="layer.closeAll();"> 关闭</button>
               {/notempty}
            </div>
       </div>
       
       <!-- /.box-footer -->          
 <script type="text/javascript">
	$(document).on("click", ".addtag", function() {
		sid = $(this).attr("sid");
		tag = $(this).attr("name");
		var val = parent.$('.tag').val();
		if (val != '') {
			val = val + ',' + tag;
		} else {
			val = tag;
		}
		parent.$('.tag').val(val);
	});
</script>       
</body>
</html>
